home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple WWDC 1996
/
WWDC96_1996 (CD).toast
/
Technology Materials
/
MacOS 8 Resources
/
Developer Tools
/
Mac OS 8 Interfaces & Libraries
/
Interfaces
/
AIncludes
/
Sound.a
< prev
next >
Wrap
Text File
|
1996-05-01
|
30KB
|
989 lines
;
; File: Sound.a
;
; Contains: Sound Manager Interfaces.
;
; Version: Technology: Sound Manager 3.1
; Release: Universal Interfaces 3.0d3 on Copland DR1
;
; Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
;
; Bugs?: If you find a problem with this file, send the file and version
; information (from above) and the problem description to:
;
; Internet: apple.bugs@applelink.apple.com
; AppleLink: APPLE.BUGS
;
;
IF &TYPE('__SOUND__') = 'UNDEFINED' THEN
__SOUND__ SET 1
IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
include 'Types.a'
ENDIF
IF &TYPE('__COMPONENTS__') = 'UNDEFINED' THEN
include 'Components.a'
ENDIF
IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
include 'MixedMode.a'
ENDIF
IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
;
; * * * N O T E * * *
;
; This file has been updated to include Sound Manager 3.2 interfaces.
;
; Some of the Sound Manager 3.0 interfaces were not put into the InterfaceLib
; that originally shipped with the PowerMacs. These missing functions and the
; new 3.2 interfaces have been released in the SoundLib library for PowerPC
; developers to link with. The runtime library for these functions are
; installed by Sound Manager 3.2. The following functions are found in SoundLib.
;
; GetCompressionInfo(), GetSoundPreference(), SetSoundPreference(),
; UnsignedFixedMulDiv(), SndGetInfo(), SndSetInfo(), GetSoundOutputInfo(),
; SetSoundOutputInfo(), GetCompressionName(), SoundConverterOpen(),
; SoundConverterClose(), SoundConverterGetBufferSizes(), SoundConverterBeginConversion(),
; SoundConverterConvertBuffer(), SoundConverterEndConversion()
;
;
; Interfaces for Sound Driver, !!! OBSOLETE and NOT SUPPORTED !!!
;
; These items are no longer defined, but appear here so that someone
; searching the interfaces might find them. If you are using one of these
; items, you must change your code to support the Sound Manager.
;
; swMode, ftMode, ffMode
; FreeWave, FFSynthRec, Tone, SWSynthRec, Wave, FTSoundRec
; SndCompletionProcPtr
; StartSound, StopSound, SoundDone
;
soundListRsrc EQU 'snd ' ;Resource type used by Sound Manager
rate44khz EQU $AC440000 ;44100.00000 in fixed-point
rate22050hz EQU $56220000 ;22050.00000 in fixed-point
rate22khz EQU $56EE8BA3 ;22254.54545 in fixed-point
rate11khz EQU $2B7745D1 ;11127.27273 in fixed-point
rate11025hz EQU $2B110000 ;11025.00000 in fixed-point
;synthesizer numbers for SndNewChannel
squareWaveSynth EQU 1 ;square wave synthesizer
waveTableSynth EQU 3 ;wave table synthesizer
sampledSynth EQU 5 ;sampled sound synthesizer
;old Sound Manager MACE synthesizer numbers
MACE3snthID EQU 11
MACE6snthID EQU 13
kMiddleC EQU 60 ;MIDI note value for middle C
kSimpleBeepID EQU 1 ;reserved resource ID for Simple Beep
kFullVolume EQU $0100 ;1.0, setting for full hardware output volume
kNoVolume EQU 0 ;setting for no sound volume
;command numbers for SndDoCommand and SndDoImmediate
nullCmd EQU 0
initCmd EQU 1
freeCmd EQU 2
quietCmd EQU 3
flushCmd EQU 4
reInitCmd EQU 5
waitCmd EQU 10
pauseCmd EQU 11
resumeCmd EQU 12
callBackCmd EQU 13
syncCmd EQU 14
availableCmd EQU 24
versionCmd EQU 25
totalLoadCmd EQU 26
loadCmd EQU 27
freqDurationCmd EQU 40
restCmd EQU 41
freqCmd EQU 42
ampCmd EQU 43
timbreCmd EQU 44
getAmpCmd EQU 45
volumeCmd EQU 46 ;sound manager 3.0 or later only
getVolumeCmd EQU 47 ;sound manager 3.0 or later only
waveTableCmd EQU 60
phaseCmd EQU 61
soundCmd EQU 80
bufferCmd EQU 81
rateCmd EQU 82
continueCmd EQU 83
doubleBufferCmd EQU 84
getRateCmd EQU 85
rateMultiplierCmd EQU 86
getRateMultiplierCmd EQU 87
sizeCmd EQU 90 ;obsolete command
convertCmd EQU 91 ;obsolete MACE command
stdQLength EQU 128
dataOffsetFlag EQU $8000
; channel initialization parameters
IF OLDROUTINENAMES THEN
waveInitChannelMask EQU $07
waveInitChannel0 EQU $04 ;wave table only, Sound Manager 2.0 and earlier
waveInitChannel1 EQU $05 ;wave table only, Sound Manager 2.0 and earlier
waveInitChannel2 EQU $06 ;wave table only, Sound Manager 2.0 and earlier
waveInitChannel3 EQU $07 ;wave table only, Sound Manager 2.0 and earlier
initChan0 EQU $04 ;obsolete spelling
initChan1 EQU $05 ;obsolete spelling
initChan2 EQU $06 ;obsolete spelling
initChan3 EQU $07 ;obsolete spelling
ENDIF
initChanLeft EQU $0002 ;left stereo channel
initChanRight EQU $0003 ;right stereo channel
initNoInterp EQU $0004 ;no linear interpolation
initNoDrop EQU $0008 ;no drop-sample conversion
initMono EQU $0080 ;monophonic channel
initStereo EQU $00C0 ;stereo channel
initMACE3 EQU $0300 ;MACE 3:1
initMACE6 EQU $0400 ;MACE 6:1
initPanMask EQU $0003 ;mask for right/left pan values
initSRateMask EQU $0030 ;mask for sample rate values
initStereoMask EQU $00C0 ;mask for mono/stereo values
initCompMask EQU $FF00 ;mask for compression IDs
kUseOptionalOutputDevice EQU -1 ;only for Sound Manager 3.0 or later
notCompressed EQU 0 ;compression ID's
fixedCompression EQU -1 ;compression ID for fixed-sized compression
variableCompression EQU -2 ;compression ID for variable-sized compression
twoToOne EQU 1
eightToThree EQU 2
threeToOne EQU 3
sixToOne EQU 4
IF ¨ GENERATINGPOWERPC THEN
stdSH EQU $00 ;Standard sound header encode value
extSH EQU $FF ;Extended sound header encode value
cmpSH EQU $FE ;Compressed sound header encode value
ENDIF
outsideCmpSH EQU 0 ;obsolete MACE constant
insideCmpSH EQU 1 ;obsolete MACE constant
aceSuccess EQU 0 ;obsolete MACE constant
aceMemFull EQU 1 ;obsolete MACE constant
aceNilBlock EQU 2 ;obsolete MACE constant
aceBadComp EQU 3 ;obsolete MACE constant
aceBadEncode EQU 4 ;obsolete MACE constant
aceBadDest EQU 5 ;obsolete MACE constant
aceBadCmd EQU 6 ;obsolete MACE constant
sixToOnePacketSize EQU 8
threeToOnePacketSize EQU 16
stateBlockSize EQU 64
leftOverBlockSize EQU 32
firstSoundFormat EQU $0001 ;general sound format
secondSoundFormat EQU $0002 ;special sampled sound format (HyperCard)
dbBufferReady EQU $00000001 ;double buffer is filled
dbLastBuffer EQU $00000004 ;last double buffer to play
sysBeepDisable EQU $0000 ;SysBeep() enable flags
sysBeepEnable EQU $01
sysBeepSynchronous EQU $02 ;if bit set, make alert sounds synchronous
unitTypeNoSelection EQU $FFFF ;unitTypes for AudioSelection.unitType
unitTypeSeconds EQU $0000
; unsigned fixed-point number
; typedef unsigned long UnsignedFixed
SndCommand RECORD 0
cmd ds.w 1 ; offset: $0 (0)
param1 ds.w 1 ; offset: $2 (2)
param2 ds.l 1 ; offset: $4 (4)
sizeof EQU * ; size: $8 (8)
ENDR
; typedef SndChannel * SndChannelPtr
SndChannel RECORD 0
nextChan ds.l 1 ; offset: $0 (0)
firstMod ds.l 1 ; offset: $4 (4) ; reserved for the Sound Manager
callBack ds.l 1 ; offset: $8 (8)
userInfo ds.l 1 ; offset: $C (12)
wait ds.l 1 ; offset: $10 (16) ; The following is for internal Sound Manager use only.
cmdInProgress ds SndCommand ; offset: $14 (20)
flags ds.w 1 ; offset: $1C (28)
qLength ds.w 1 ; offset: $1E (30)
qHead ds.w 1 ; offset: $20 (32)
qTail ds.w 1 ; offset: $22 (34)
queue ds.b 128 * SndCommand.sizeof ; offset: $24 (36)
sizeof EQU * ; size: $424 (1060)
ENDR
; MACE structures
StateBlock RECORD 0
stateVar ds.w 64 ; offset: $0 (0)
sizeof EQU * ; size: $80 (128)
ENDR
; typedef struct StateBlock * StateBlockPtr
LeftOverBlock RECORD 0
count ds.l 1 ; offset: $0 (0)
sampleArea ds.b 32 ; offset: $4 (4)
sizeof EQU * ; size: $24 (36)
ENDR
; typedef struct LeftOverBlock * LeftOverBlockPtr
ModRef RECORD 0
modNumber ds.w 1 ; offset: $0 (0)
modInit ds.l 1 ; offset: $2 (2)
sizeof EQU * ; size: $6 (6)
ENDR
SndListResource RECORD 0
format ds.w 1 ; offset: $0 (0)
numModifiers ds.w 1 ; offset: $2 (2)
modifierPart ds ModRef ; offset: $4 (4) <-- really an array of length one
numCommands ds.w 1 ; offset: $A (10)
commandPart ds SndCommand ; offset: $C (12) <-- really an array of length one
dataPart ds.b 1 ; offset: $14 (20) <-- really an array of length one
ORG 22
sizeof EQU * ; size: $16 (22)
ENDR
; typedef struct SndListResource * SndListPtr
; typedef SndListPtr * SndListHndl
; typedef SndListPtr * SndListHandle
; HyperCard sound resource format
Snd2ListResource RECORD 0
format ds.w 1 ; offset: $0 (0)
refCount ds.w 1 ; offset: $2 (2)
numCommands ds.w 1 ; offset: $4 (4)
commandPart ds SndCommand ; offset: $6 (6) <-- really an array of length one
dataPart ds.b 1 ; offset: $E (14) <-- really an array of length one
ORG 16
sizeof EQU * ; size: $10 (16)
ENDR
; typedef struct Snd2ListResource * Snd2ListPtr
; typedef Snd2ListPtr * Snd2ListHndl
; typedef Snd2ListPtr * Snd2ListHandle
SoundHeader RECORD 0
samplePtr ds.l 1 ; offset: $0 (0) ; if NIL then samples are in sampleArea
length ds.l 1 ; offset: $4 (4) ; length of sound in bytes
sampleRate ds.l 1 ; offset: $8 (8) ; sample rate for this sound
loopStart ds.l 1 ; offset: $C (12) ; start of looping portion
loopEnd ds.l 1 ; offset: $10 (16) ; end of looping portion
encode ds.b 1 ; offset: $14 (20) ; header encoding
baseFrequency ds.b 1 ; offset: $15 (21) ; baseFrequency value
sampleArea ds.b 1 ; offset: $16 (22) <-- really an array of length one ; space for when samples follow directly
ORG 24
sizeof EQU * ; size: $18 (24)
ENDR
; typedef struct SoundHeader * SoundHeaderPtr
CmpSoundHeader RECORD 0
samplePtr ds.l 1 ; offset: $0 (0) ; if nil then samples are in sample area
numChannels ds.l 1 ; offset: $4 (4) ; number of channels i.e. mono = 1
sampleRate ds.l 1 ; offset: $8 (8) ; sample rate in Apples Fixed point representation
loopStart ds.l 1 ; offset: $C (12) ; loopStart of sound before compression
loopEnd ds.l 1 ; offset: $10 (16) ; loopEnd of sound before compression
encode ds.b 1 ; offset: $14 (20) ; data structure used , stdSH, extSH, or cmpSH
baseFrequency ds.b 1 ; offset: $15 (21) ; same meaning as regular SoundHeader
numFrames ds.l 1 ; offset: $16 (22) ; length in frames ( packetFrames or sampleFrames )
AIFFSampleRate ds extended80 ; offset: $1A (26) ; IEEE sample rate
markerChunk ds.l 1 ; offset: $24 (36) ; sync track
format ds.l 1 ; offset: $28 (40) ; data format type, was futureUse1
futureUse2 ds.l 1 ; offset: $2C (44) ; reserved by Apple
stateVars ds.l 1 ; offset: $30 (48) ; pointer to State Block
leftOverSamples ds.l 1 ; offset: $34 (52) ; used to save truncated samples between compression calls
compressionID ds.w 1 ; offset: $38 (56) ; 0 means no compression, non zero means compressionID
packetSize ds.w 1 ; offset: $3A (58) ; number of bits in compressed sample packet
snthID ds.w 1 ; offset: $3C (60) ; resource ID of Sound Manager snth that contains NRT C/E
sampleSize ds.w 1 ; offset: $3E (62) ; number of bits in non-compressed sample
sampleArea ds.b 1 ; offset: $40 (64) <-- really an array of length one ; space for when samples follow directly
ORG 66
sizeof EQU * ; size: $42 (66)
ENDR
; typedef struct CmpSoundHeader * CmpSoundHeaderPtr
ExtSoundHeader RECORD 0
samplePtr ds.l 1 ; offset: $0 (0) ; if nil then samples are in sample area
numChannels ds.l 1 ; offset: $4 (4) ; number of channels, ie mono = 1
sampleRate ds.l 1 ; offset: $8 (8) ; sample rate in Apples Fixed point representation
loopStart ds.l 1 ; offset: $C (12) ; same meaning as regular SoundHeader
loopEnd ds.l 1 ; offset: $10 (16) ; same meaning as regular SoundHeader
encode ds.b 1 ; offset: $14 (20) ; data structure used , stdSH, extSH, or cmpSH
baseFrequency ds.b 1 ; offset: $15 (21) ; same meaning as regular SoundHeader
numFrames ds.l 1 ; offset: $16 (22) ; length in total number of frames
AIFFSampleRate ds extended80 ; offset: $1A (26) ; IEEE sample rate
markerChunk ds.l 1 ; offset: $24 (36) ; sync track
instrumentChunks ds.l 1 ; offset: $28 (40) ; AIFF instrument chunks
AESRecording ds.l 1 ; offset: $2C (44)
sampleSize ds.w 1 ; offset: $30 (48) ; number of bits in sample
futureUse1 ds.w 1 ; offset: $32 (50) ; reserved by Apple
futureUse2 ds.l 1 ; offset: $34 (52) ; reserved by Apple
futureUse3 ds.l 1 ; offset: $38 (56) ; reserved by Apple
futureUse4 ds.l 1 ; offset: $3C (60) ; reserved by Apple
sampleArea ds.b 1 ; offset: $40 (64) <-- really an array of length one ; space for when samples follow directly
ORG 66
sizeof EQU * ; size: $42 (66)
ENDR
; typedef struct ExtSoundHeader * ExtSoundHeaderPtr
ConversionBlock RECORD 0
destination ds.w 1 ; offset: $0 (0)
unused ds.w 1 ; offset: $2 (2)
inputPtr ds.l 1 ; offset: $4 (4)
outputPtr ds.l 1 ; offset: $8 (8)
sizeof EQU * ; size: $C (12)
ENDR
; typedef struct ConversionBlock * ConversionBlockPtr
SMStatus RECORD 0
smMaxCPULoad ds.w 1 ; offset: $0 (0)
smNumChannels ds.w 1 ; offset: $2 (2)
smCurCPULoad ds.w 1 ; offset: $4 (4)
sizeof EQU * ; size: $6 (6)
ENDR
; typedef struct SMStatus * SMStatusPtr
SCStatus RECORD 0
scStartTime ds.l 1 ; offset: $0 (0)
scEndTime ds.l 1 ; offset: $4 (4)
scCurrentTime ds.l 1 ; offset: $8 (8)
scChannelBusy ds.b 1 ; offset: $C (12)
scChannelDisposed ds.b 1 ; offset: $D (13)
scChannelPaused ds.b 1 ; offset: $E (14)
scUnused ds.b 1 ; offset: $F (15)
scChannelAttributes ds.l 1 ; offset: $10 (16)
scCPULoad ds.l 1 ; offset: $14 (20)
sizeof EQU * ; size: $18 (24)
ENDR
; typedef struct SCStatus * SCStatusPtr
AudioSelection RECORD 0
unitType ds.l 1 ; offset: $0 (0)
selStart ds.l 1 ; offset: $4 (4)
selEnd ds.l 1 ; offset: $8 (8)
sizeof EQU * ; size: $C (12)
ENDR
; typedef struct AudioSelection * AudioSelectionPtr
SndDoubleBuffer RECORD 0
dbNumFrames ds.l 1 ; offset: $0 (0)
dbFlags ds.l 1 ; offset: $4 (4)
dbUserInfo ds.l 2 ; offset: $8 (8)
dbSoundData ds.b 1 ; offset: $10 (16) <-- really an array of length one
ORG 18
sizeof EQU * ; size: $12 (18)
ENDR
; typedef struct SndDoubleBuffer * SndDoubleBufferPtr
SndDoubleBufferHeader RECORD 0
dbhNumChannels ds.w 1 ; offset: $0 (0)
dbhSampleSize ds.w 1 ; offset: $2 (2)
dbhCompressionID ds.w 1 ; offset: $4 (4)
dbhPacketSize ds.w 1 ; offset: $6 (6)
dbhSampleRate ds.l 1 ; offset: $8 (8)
dbhBufferPtr ds.l 2 ; offset: $C (12)
dbhDoubleBack ds.l 1 ; offset: $14 (20)
sizeof EQU * ; size: $18 (24)
ENDR
; typedef struct SndDoubleBufferHeader * SndDoubleBufferHeaderPtr
SndDoubleBufferHeader2 RECORD 0
dbhNumChannels ds.w 1 ; offset: $0 (0)
dbhSampleSize ds.w 1 ; offset: $2 (2)
dbhCompressionID ds.w 1 ; offset: $4 (4)
dbhPacketSize ds.w 1 ; offset: $6 (6)
dbhSampleRate ds.l 1 ; offset: $8 (8)
dbhBufferPtr ds.l 2 ; offset: $C (12)
dbhDoubleBack ds.l 1 ; offset: $14 (20)
dbhFormat ds.l 1 ; offset: $18 (24)
sizeof EQU * ; size: $1C (28)
ENDR
; typedef struct SndDoubleBufferHeader2 * SndDoubleBufferHeader2Ptr
SoundInfoList RECORD 0
count ds.w 1 ; offset: $0 (0)
infoHandle ds.l 1 ; offset: $2 (2)
sizeof EQU * ; size: $6 (6)
ENDR
; typedef struct SoundInfoList * SoundInfoListPtr
SoundComponentData RECORD 0
flags ds.l 1 ; offset: $0 (0)
format ds.l 1 ; offset: $4 (4)
numChannels ds.w 1 ; offset: $8 (8)
sampleSize ds.w 1 ; offset: $A (10)
sampleRate ds.l 1 ; offset: $C (12)
sampleCount ds.l 1 ; offset: $10 (16)
buffer ds.l 1 ; offset: $14 (20)
reserved ds.l 1 ; offset: $18 (24)
sizeof EQU * ; size: $1C (28)
ENDR
; typedef struct SoundComponentData * SoundComponentDataPtr
CompressionInfo RECORD 0
recordSize ds.l 1 ; offset: $0 (0)
format ds.l 1 ; offset: $4 (4)
compressionID ds.w 1 ; offset: $8 (8)
samplesPerPacket ds.w 1 ; offset: $A (10)
bytesPerPacket ds.w 1 ; offset: $C (12)
bytesPerFrame ds.w 1 ; offset: $E (14)
bytesPerSample ds.w 1 ; offset: $10 (16)
futureUse1 ds.w 1 ; offset: $12 (18)
sizeof EQU * ; size: $14 (20)
ENDR
; typedef struct CompressionInfo * CompressionInfoPtr
; typedef CompressionInfoPtr * CompressionInfoHandle
; private thing to use as a reference to a Sound Converter
IF FOR_SYSTEM7_ONLY THEN
;
; These two routines for Get/SetSoundVol should no longer be used.
; They were for old Apple Sound Chip machines, and do not support the DSP or PowerMacs.
; Use Get/SetDefaultOutputVolume instead, if you must change the user's machine.
;
IF OLDROUTINENAMES ** ¨ GENERATINGCFM THEN
;
; pascal void SetSoundVol(short level)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION SetSoundVol
ENDIF
;
; pascal void GetSoundVol(short *level)
;
IF ¨ GENERATINGCFM THEN
; parameters:
; level => A0
Macro
_GetSoundVol
clr.b (A0)+
move.b $0260,(A0)
EndM
ELSE
IMPORT_CFM_FUNCTION GetSoundVol
ENDIF
ENDIF
ENDIF
;
; pascal void SysBeep(short duration)
;
IF ¨ GENERATINGCFM THEN
_SysBeep: OPWORD $A9C8
ELSE
IMPORT_CFM_FUNCTION SysBeep
ENDIF
;
; pascal OSErr SndDoCommand(SndChannelPtr chan, const SndCommand *cmd, Boolean noWait)
;
IF ¨ GENERATINGCFM THEN
_SndDoCommand: OPWORD $A803
ELSE
IMPORT_CFM_FUNCTION SndDoCommand
ENDIF
;
; pascal OSErr SndDoImmediate(SndChannelPtr chan, const SndCommand *cmd)
;
IF ¨ GENERATINGCFM THEN
_SndDoImmediate: OPWORD $A804
ELSE
IMPORT_CFM_FUNCTION SndDoImmediate
ENDIF
;
; pascal OSErr SndNewChannel(SndChannelPtr *chan, short synth, long init, SndCallBackUPP userRoutine)
;
IF ¨ GENERATINGCFM THEN
_SndNewChannel: OPWORD $A807
ELSE
IMPORT_CFM_FUNCTION SndNewChannel
ENDIF
;
; pascal OSErr SndDisposeChannel(SndChannelPtr chan, Boolean quietNow)
;
IF ¨ GENERATINGCFM THEN
_SndDisposeChannel: OPWORD $A801
ELSE
IMPORT_CFM_FUNCTION SndDisposeChannel
ENDIF
;
; pascal OSErr SndPlay(SndChannelPtr chan, SndListHandle sndHandle, Boolean async)
;
IF ¨ GENERATINGCFM THEN
_SndPlay: OPWORD $A805
ELSE
IMPORT_CFM_FUNCTION SndPlay
ENDIF
IF OLDROUTINENAMES THEN
;
; pascal OSErr SndAddModifier(SndChannelPtr chan, Ptr modifier, short id, long init)
;
IF ¨ GENERATINGCFM THEN
_SndAddModifier: OPWORD $A802
ELSE
IMPORT_CFM_FUNCTION SndAddModifier
ENDIF
ENDIF
;
; pascal OSErr SndControl(short id, SndCommand *cmd)
;
IF ¨ GENERATINGCFM THEN
_SndControl: OPWORD $A806
ELSE
IMPORT_CFM_FUNCTION SndControl
ENDIF
; Sound Manager 2.0 and later, uses _SoundDispatch
;
; pascal NumVersion SndSoundManagerVersion(void )
;
IF ¨ GENERATINGCFM THEN
Macro
_SndSoundManagerVersion
move.l #$000C0008,D0
dc.w $A800
EndM
ELSE
IMPORT_CFM_FUNCTION SndSoundManagerVersion
ENDIF
;
; pascal OSErr SndStartFilePlay(SndChannelPtr chan, short fRefNum, short resNum, long bufferSize, void *theBuffer, AudioSelectionPtr theSelection, FilePlayCompletionUPP theCompletion, Boolean async)
;
IF ¨ GENERATINGCFM THEN
Macro
_SndStartFilePlay
move.l #$0D000008,D0
dc.w $A800
EndM
ELSE
IMPORT_CFM_FUNCTION SndStartFilePlay
ENDIF
;
; pascal OSErr SndPauseFilePlay(SndChannelPtr chan)
;
IF ¨ GENERATINGCFM THEN
Macro
_SndPauseFilePlay
move.l #$02040008,D0
dc.w $A800
EndM
ELSE
IMPORT_CFM_FUNCTION SndPauseFilePlay
ENDIF
;
; pascal OSErr SndStopFilePlay(SndChannelPtr chan, Boolean quietNow)
;
IF ¨ GENERATINGCFM THEN
Macro
_SndStopFilePlay
move.l #$03080008,D0
dc.w $A800
EndM
ELSE
IMPORT_CFM_FUNCTION SndStopFilePlay
ENDIF
;
; pascal OSErr SndChannelStatus(SndChannelPtr chan, short theLength, SCStatusPtr theStatus)
;
IF ¨ GENERATINGCFM THEN
Macro
_SndChannelStatus
move.l #$05100008,D0
dc.w $A800
EndM
ELSE
IMPORT_CFM_FUNCTION SndChannelStatus
ENDIF
;
; pascal OSErr SndManagerStatus(short theLength, SMStatusPtr theStatus)
;
IF ¨ GENERATINGCFM THEN
Macro
_SndManagerStatus
move.l #$03140008,D0
dc.w $A800
EndM
ELSE
IMPORT_CFM_FUNCTION SndManagerStatus
ENDIF
;
; pascal void SndGetSysBeepState(short *sysBeepState)
;
IF ¨ GENERATINGCFM THEN
Macro
_SndGetSysBeepState
move.l #$02180008,D0
dc.w $A800
EndM
ELSE
IMPORT_CFM_FUNCTION SndGetSysBeepState
ENDIF
;
; pascal OSErr SndSetSysBeepState(short sysBeepState)
;
IF ¨ GENERATINGCFM THEN
Macro
_SndSetSysBeepState
move.l #$011C0008,D0
dc.w $A800
EndM
ELSE
IMPORT_CFM_FUNCTION SndSetSysBeepState
ENDIF
;
; pascal OSErr SndPlayDoubleBuffer(SndChannelPtr chan, SndDoubleBufferHeaderPtr theParams)
;
IF ¨ GENERATINGCFM THEN
Macro
_SndPlayDoubleBuffer
move.l #$04200008,D0
dc.w $A800
EndM
ELSE
IMPORT_CFM_FUNCTION SndPlayDoubleBuffer
ENDIF
; MACE compression routines
;
; pascal NumVersion MACEVersion(void )
;
IF ¨ GENERATINGCFM THEN
Macro
_MACEVersion
move.l #$00000010,D0
dc.w $A800
EndM
ELSE
IMPORT_CFM_FUNCTION MACEVersion
ENDIF
;
; pascal void Comp3to1(const void *inBuffer, void *outBuffer, unsigned long cnt, StateBlockPtr inState, StateBlockPtr outState, unsigned long numChannels, unsigned long whichChannel)
;
IF ¨ GENERATINGCFM THEN
Macro
_Comp3to1
move.l #$00040010,D0
dc.w $A800
EndM
ELSE
IMPORT_CFM_FUNCTION Comp3to1
ENDIF
;
; pascal void Exp1to3(const void *inBuffer, void *outBuffer, unsigned long cnt, StateBlockPtr inState, StateBlockPtr outState, unsigned long numChannels, unsigned long whichChannel)
;
IF ¨ GENERATINGCFM THEN
Macro
_Exp1to3
move.l #$00080010,D0
dc.w $A800
EndM
ELSE
IMPORT_CFM_FUNCTION Exp1to3
ENDIF
;
; pascal void Comp6to1(const void *inBuffer, void *outBuffer, unsigned long cnt, StateBlockPtr inState, StateBlockPtr outState, unsigned long numChannels, unsigned long whichChannel)
;
IF ¨ GENERATINGCFM THEN
Macro
_Comp6to1
move.l #$000C0010,D0
dc.w $A800
EndM
ELSE
IMPORT_CFM_FUNCTION Comp6to1
ENDIF
;
; pascal void Exp1to6(const void *inBuffer, void *outBuffer, unsigned long cnt, StateBlockPtr inState, StateBlockPtr outState, unsigned long numChannels, unsigned long whichChannel)
;
IF ¨ GENERATINGCFM THEN
Macro
_Exp1to6
move.l #$00100010,D0
dc.w $A800
EndM
ELSE
IMPORT_CFM_FUNCTION Exp1to6
ENDIF
; Sound Manager 3.0 and later calls
;
; pascal OSErr GetSysBeepVolume(long *level)
;
IF ¨ GENERATINGCFM THEN
Macro
_GetSysBeepVolume
move.l #$02240018,D0
dc.w $A800
EndM
ELSE
IMPORT_CFM_FUNCTION GetSysBeepVolume
ENDIF
;
; pascal OSErr SetSysBeepVolume(long level)
;
IF ¨ GENERATINGCFM THEN
Macro
_SetSysBeepVolume
move.l #$02280018,D0
dc.w $A800
EndM
ELSE
IMPORT_CFM_FUNCTION SetSysBeepVolume
ENDIF
;
; pascal OSErr GetDefaultOutputVolume(long *level)
;
IF ¨ GENERATINGCFM THEN
Macro
_GetDefaultOutputVolume
move.l #$022C0018,D0
dc.w $A800
EndM
ELSE
IMPORT_CFM_FUNCTION GetDefaultOutputVolume
ENDIF
;
; pascal OSErr SetDefaultOutputVolume(long level)
;
IF ¨ GENERATINGCFM THEN
Macro
_SetDefaultOutputVolume
move.l #$02300018,D0
dc.w $A800
EndM
ELSE
IMPORT_CFM_FUNCTION SetDefaultOutputVolume
ENDIF
;
; pascal OSErr GetSoundHeaderOffset(SndListHandle sndHandle, long *offset)
;
IF ¨ GENERATINGCFM THEN
Macro
_GetSoundHeaderOffset
move.l #$04040018,D0
dc.w $A800
EndM
ELSE
IMPORT_CFM_FUNCTION GetSoundHeaderOffset
ENDIF
;
; pascal UnsignedFixed UnsignedFixedMulDiv(UnsignedFixed value, UnsignedFixed multiplier, UnsignedFixed divisor)
;
IF ¨ GENERATINGCFM THEN
Macro
_UnsignedFixedMulDiv
move.l #$060C0018,D0
dc.w $A800
EndM
ELSE
IMPORT_CFM_FUNCTION UnsignedFixedMulDiv
ENDIF
;
; pascal OSErr GetCompressionInfo(short compressionID, OSType format, short numChannels, short sampleSize, CompressionInfoPtr cp)
;
IF ¨ GENERATINGCFM THEN
Macro
_GetCompressionInfo
move.l #$07100018,D0
dc.w $A800
EndM
ELSE
IMPORT_CFM_FUNCTION GetCompressionInfo
ENDIF
;
; pascal OSErr SetSoundPreference(OSType theType, Str255 name, Handle settings)
;
IF ¨ GENERATINGCFM THEN
Macro
_SetSoundPreference
move.l #$06340018,D0
dc.w $A800
EndM
ELSE
IMPORT_CFM_FUNCTION SetSoundPreference
ENDIF
;
; pascal OSErr GetSoundPreference(OSType theType, Str255 name, Handle settings)
;
IF ¨ GENERATINGCFM THEN
Macro
_GetSoundPreference
move.l #$06380018,D0
dc.w $A800
EndM
ELSE
IMPORT_CFM_FUNCTION GetSoundPreference
ENDIF
; Sound Manager 3.1 and later calls
;
; pascal OSErr SndGetInfo(SndChannelPtr chan, OSType selector, void *infoPtr)
;
IF ¨ GENERATINGCFM THEN
Macro
_SndGetInfo
move.l #$063C0018,D0
dc.w $A800
EndM
ELSE
IMPORT_CFM_FUNCTION SndGetInfo
ENDIF
;
; pascal OSErr SndSetInfo(SndChannelPtr chan, OSType selector, const void *infoPtr)
;
IF ¨ GENERATINGCFM THEN
Macro
_SndSetInfo
move.l #$06400018,D0
dc.w $A800
EndM
ELSE
IMPORT_CFM_FUNCTION SndSetInfo
ENDIF
;
; pascal OSErr GetSoundOutputInfo(Component outputDevice, OSType selector, void *infoPtr)
;
IF ¨ GENERATINGCFM THEN
Macro
_GetSoundOutputInfo
move.l #$06440018,D0
dc.w $A800
EndM
ELSE
IMPORT_CFM_FUNCTION GetSoundOutputInfo
ENDIF
;
; pascal OSErr SetSoundOutputInfo(Component outputDevice, OSType selector, const void *infoPtr)
;
IF ¨ GENERATINGCFM THEN
Macro
_SetSoundOutputInfo
move.l #$06480018,D0
dc.w $A800
EndM
ELSE
IMPORT_CFM_FUNCTION SetSoundOutputInfo
ENDIF
; Sound Manager 3.2 and later calls
;
; pascal OSErr GetCompressionName(OSType compressionType, Str255 compressionName)
;
IF ¨ GENERATINGCFM THEN
Macro
_GetCompressionName
move.l #$044C0018,D0
dc.w $A800
EndM
ELSE
IMPORT_CFM_FUNCTION GetCompressionName
ENDIF
;
; pascal OSErr SoundConverterOpen(const SoundComponentData *inputFormat, const SoundComponentData *outputFormat, SoundConverter *sc)
;
IF ¨ GENERATINGCFM THEN
Macro
_SoundConverterOpen
move.l #$06500018,D0
dc.w $A800
EndM
ELSE
IMPORT_CFM_FUNCTION SoundConverterOpen
ENDIF
;
; pascal OSErr SoundConverterClose(SoundConverter sc)
;
IF ¨ GENERATINGCFM THEN
Macro
_SoundConverterClose
move.l #$02540018,D0
dc.w $A800
EndM
ELSE
IMPORT_CFM_FUNCTION SoundConverterClose
ENDIF
;
; pascal OSErr SoundConverterGetBufferSizes(SoundConverter sc, unsigned long inputBytesTarget, unsigned long *inputFrames, unsigned long *inputBytes, unsigned long *outputBytes)
;
IF ¨ GENERATINGCFM THEN
Macro
_SoundConverterGetBufferSizes
move.l #$0A580018,D0
dc.w $A800
EndM
ELSE
IMPORT_CFM_FUNCTION SoundConverterGetBufferSizes
ENDIF
;
; pascal OSErr SoundConverterBeginConversion(SoundConverter sc)
;
IF ¨ GENERATINGCFM THEN
Macro
_SoundConverterBeginConversion
move.l #$025C0018,D0
dc.w $A800
EndM
ELSE
IMPORT_CFM_FUNCTION SoundConverterBeginConversion
ENDIF
;
; pascal OSErr SoundConverterConvertBuffer(SoundConverter sc, const void *inputPtr, unsigned long inputFrames, void *outputPtr, unsigned long *outputFrames, unsigned long *outputBytes)
;
IF ¨ GENERATINGCFM THEN
Macro
_SoundConverterConvertBuffer
move.l #$0C600018,D0
dc.w $A800
EndM
ELSE
IMPORT_CFM_FUNCTION SoundConverterConvertBuffer
ENDIF
;
; pascal OSErr SoundConverterEndConversion(SoundConverter sc, void *outputPtr, unsigned long *outputFrames, unsigned long *outputBytes)
;
IF ¨ GENERATINGCFM THEN
Macro
_SoundConverterEndConversion
move.l #$08640018,D0
dc.w $A800
EndM
ELSE
IMPORT_CFM_FUNCTION SoundConverterEndConversion
ENDIF
ENDIF
ENDIF ; __SOUND__